/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const permission = {
  path: '/permission',
  component: Layout,
  redirect: '/permission/user',
  name: 'permission',
  alwaysShow: true,
  meta: {
    title: '系统管理',
    icon: 'sidebar_finance_unselect',
    roles: ['system']
  },
  children: [
    // {
    //   path: 'personal',
    //   component: () => import('@/views/personal'),
    //   hidden: true
    // },
    {
      path: 'user',
      component: () => import('@/views/permission/user'),
      name: 'user',
      meta: { title: '后台用户管理', noCache: true, roles: ['user'] }
    },
    {
      path: 'role',
      component: () => import('@/views/permission/role'),
      name: 'role',
      meta: { title: '角色管理', noCache: true, roles: ['role'] }
    },
    {
      path: 'menu',
      component: () => import('@/views/permission/menu'),
      name: 'menu',
      meta: { title: '菜单管理', noCache: true, roles: ['menu'] }
    },
    {
      path: 'job',
      component: () => import('@/views/permission/job'),
      name: 'job',
      meta: { title: '岗位管理', noCache: true, roles: ['job'] }
    },
    {
      path: 'dept',
      component: () => import('@/views/permission/dept'),
      name: 'dept',
      meta: { title: '部门管理', noCache: true, roles: ['dept'] }
    }
  ]
}

export default permission
